FROM centos

ENV GOPROXY https://gocenter.io
ENV KKZONE=cn

RUN yum update -y && yum install golang vim curl openssh-server sudo git yum-utils -y \
    && yum-config-manager --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo \
    && yum update -y \
    && yum install docker-ce docker-ce-cli containerd.io -y

RUN git clone https://github.com/kubesphere/kubekey \
    && cd kubekey && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on \
    go build  -o /usr/local/bin/kk ./cmd/kk/main.go

#RUN kk create cluster --with-kubernetes v1.17.9
